import { useEffect } from "react";
import { Spin } from "antd";
import NProgress from "nprogress";
import "nprogress/nprogress.css";

NProgress.configure({
  showSpinner: false,
});

function Loading() {
  NProgress.start();

  useEffect(() => {
    NProgress.done();
  }, []);

  return (
    <div className="flex justify-center">
      <Spin />
    </div>
  );
}

export default Loading;
